package com.android.demolayoutpages;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.LinearLayout.LayoutParams;

public class ChooseGoalBoardActivity extends BaseActivity implements
		OnClickListener {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView();
		setUpView();
	}

	private void setContentView() {
		LinearLayout layoutAppContents = (LinearLayout) findViewById(R.id.layout_app_contents);
		View contentsView = ((LayoutInflater) ChooseGoalBoardActivity.this
				.getSystemService(ChooseGoalBoardActivity.this.LAYOUT_INFLATER_SERVICE))
				.inflate(R.layout.layout_choose_goalboardlist, null);
		contentsView.setLayoutParams(new LinearLayout.LayoutParams(
				LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));

		layoutAppContents.addView(contentsView);
	}

	private void setUpView() {

		TextView tvselectedTitle = (TextView) findViewById(R.id.txt_selectedTitle);
		tvselectedTitle.setText("select your experts");
		Button btnLeftNevigation = (Button) findViewById(R.id.btn_left_nevigation);
		Button btnRightNevigation = (Button) findViewById(R.id.btn_right_nevigation);
		ListView lvChooseGoalboards = (ListView) findViewById(R.id.lv_experts_chooseGoalBoard);
		btnLeftNevigation.setVisibility(View.VISIBLE);
		btnRightNevigation.setVisibility(View.VISIBLE);
		btnRightNevigation.setText("finish");
		btnLeftNevigation.setText("back");
		btnRightNevigation.setOnClickListener(this);
		btnLeftNevigation.setOnClickListener(this);
		lvChooseGoalboards.setAdapter(new ChooseGoalListAdapter(this));

	}

	@Override
	public void onClick(View view) {

		super.onClick(view);
		switch (view.getId()) {
		case R.id.btn_left_nevigation:
			finish();

			break;

		case R.id.btn_right_nevigation:

			break;

		default:
			break;
		}
	}
}
